package com.accp.ssmoa.util;

import org.apache.shiro.crypto.hash.SimpleHash;

public class EncryptingByMD5 {

	
	//自定义使用MD5加密的静态方法
	public static String encrypting(Object source,Object salt) {

		String algorithmName="MD5";//采用的算法名称
		
		int hashIterations=1024;//加密次数，次数越多，加密后越复杂
		
		//返回加密码
		String encryption=new SimpleHash(algorithmName, source, salt, hashIterations).toString();
		
		return encryption;
	}
}
